package com.mtons.core.interfaces.action;

import javax.validation.Valid;

import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.mtons.core.entity.po.AccountPO;


public interface IAccountAction {

	@RequestMapping(value={"/","list"}, method=RequestMethod.GET)
	public String listAccount(ModelMap model);
	
	@RequestMapping(value={"/new"}, method=RequestMethod.GET)
	public String newAccount(ModelMap model);
	
	@RequestMapping(value={"/save"}, method=RequestMethod.POST)
	public String saveAccount(@Valid AccountPO po, BindingResult result, ModelMap model);
	
	@RequestMapping(value={"/edit-{ssn}-account"}, method=RequestMethod.GET)
	public String editAccount(@PathVariable String ssn, ModelMap modell);
	
	@RequestMapping(value={"/edit-{ssn}-account"}, method=RequestMethod.POST)
	public String updateAccount(@Valid AccountPO po, BindingResult result, ModelMap model, @PathVariable String ssn);
	
	@RequestMapping(value={"/delete-{ssn}-account"}, method=RequestMethod.GET)
	public String deleteAccount(@PathVariable String ssn);
	
	@RequestMapping(value="/main", method=RequestMethod.GET)
	public String main();
	
}
